pp108 : Creating and Configuring a Custom Connector

Creating and Configuring a Custom Connector

This topic describes the procedure to create and configure a custom connector.

Before you begin this task:

  • Install Process Platform.
  • You must have the role Developer.

Process Platform provides a set of default Application Connectors that process the business logic and provide connectivity to various back ends. Apart from these, you can build your own custom connector to connect to any specific back end. When the default set of connectors do not serve the purpose for your Process Platform based custom applications, you can choose to create a custom connector.

After creating a custom connector, it is essential to configure it to the Process Platform framework to enable connectivity. Process Platform provides a feature to provide a user-friendly interface to configure the custom connectors. After configuration, you can find the schema of this interface at CUSP > My Applications > XMLStore Explorer () > Collection > Cordys > WCP > Application Connector.

  1. Create two java files by extending ApplicationConnector class and implementing ApplicationTransaction class. Ensure to override the below indicated Web service operations:

    Java Class

    Web service operations to be overridden

    class com.eibus.soap.ApplicationConnector

    * open() - This is invoked by the service container after establishing the connection to the Process Platform ESB.
    * close() - This is invoked by the service container after closing the connection to the Process Platform ESB.
    * reset() - This is invoked by the service container to clear the cache.
    * createTransaction() - This is invoked by the service container to indicate the arrival of a new message and creation of a SOAPTransaction for it.

    com.eibus.soap.ApplicationTransaction

    * commit() - This is invoked by the SOAPTransaction, when the entire SOAPTransaction succeeds and can be committed.
    * abort() - This is invoked by the SOAPTransaction, when one of the ApplicationTransactions has returned false during the process() method.
    * canProcess() - This method returnsTrue, if the XML mapper can process Web service operations defined of the specified type such as SQL, Java, LDAP and so on.
    * process() - This is invoked to process the relevant body blocks within this transaction.

    Note:
    For more information about these Web service operations, refer to Java SDK documentation.

  2. Generate a JAR file for the above indicated Java files.Note: This JAR file will be used while registering the custom connector.
  3. Create a HTML file, include /cordys/wcp/admin/behavior/applicationconnector.js and add the method initialize() as an event-handler to the application's onapplicationready event.
  4. In this HTML file, create the implementation for the following Web service operations: createConnectorConfiguration() and fillInPropertyScreen(). For details on implementation of Web service operations, refer to Custom Connector APIs.
  5. Create a custom Web service interface with the necessary Web service operations.
  6. Configure your connector and associate with the framework using the HTML page, implementation class (java class) and publish the connector. Follow the below steps to configure the connector:
    1. Create a project in CWS.
    2. Select a starting point and click to open the Application Connector Editor.The Untitled Application Connector - Application Connector window appears.
    3. Provide Configuration information in the <Application Connector Name> - Application Connectorwindow.

      Note:
      Ensure to provide the Implementation Class and Property Page details during configuration. If not, the custom connector will not be available for deployment.

    4. Click . The Save Document dialog box appears.
    5. Provide the Name and Description, and click to browse and select the location to save the connector. The folder path where the connector will be created appears in the Save in Folder field.
    6. Close the Application Connector window.

The custom Application Connector is created and configured with the provided name and is stored at the selected location.

After you complete this task

  1. Publish the custom Application Connector.
  2. Create a Service Group and during the process ensure to select the custom connector and custom Web service interface that you have created in the previous steps. The configuration page for the Application Connector would be taken from the Property Page URL mentioned while configuring the connector.
  3. Deploy the custom Web service interface in the XForms.

Note: To modify a configuration of a custom Application Connector, refer to Editing or Deleting Custom Connectors.

 

 

Related tasks

Using APIs for Database Access
Editing a Custom Application Connector

Related reference

Defining a Managed Component in an Application Connector
Configuration Parameters for Custom Application Connectors

Related information

Implementing Java Management Extensions (JMX) in Applications
Working with Logging Framework
Application Connectors
Configuration Parameters for Application Connectors